<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" autocomplete="off">
    <div class="form-group">
        <label for="c-number_id" class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('工号')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-number_id" data-rule="required" class="form-control" name="row[number_id]" type="text" value="{$row.number_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-nickname" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-nickname" class="form-control" name="row[nickname]" type="text" value="{$row.nickname|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-gender" class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[gender]', ['1'=>__('Male'), '0'=>__('Female')], $row['gender'])}
        </div>
    </div>
    <div class="form-group">
        <label for="c-age" class="control-label col-xs-12 col-sm-2">{:__('年龄')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-age" class="form-control" name="row[age]" type="number" value="{$row.age|htmlentities}" onmousewheel="return false;" onDOMMouseScroll="stopScrollFun">
        </div>
    </div>

    <div class="form-group">
        <label for="c-username" class="control-label col-xs-12 col-sm-2"><span style="color:red;">*</span>{:__('Username')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-username" data-rule="required" class="form-control" name="row[username]" type="text" value="{$row.username|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('Password')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-password" data-rule="password" class="form-control" name="row[password]" type="text" value="" placeholder="{:__('Leave password blank if dont want to change')}" autocomplete="new-password" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-password" class="control-label col-xs-12 col-sm-2">{:__('职务类型')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-postname" class="form-control" name="row[postname]" type="text" value="{$row.postname|htmlentities}" />
        </div>
    </div>

    <!--<div class="form-group">-->
        <!--<label for="content" class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>-->
        <!--<div class="col-xs-12 col-sm-8">-->
            <!--{:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}-->
        <!--</div>-->
    <!--</div>-->
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    function change_cate(obj){
        $("#c-org_cate_id").val($(obj).val());
    }

    function change_grade(obj){
        $("#c-org_grade_id").val($(obj).val());
    }
</script>
<script>
    function stopScrollFun(evt) {
        evt = evt || window.event;
        if(evt.preventDefault) {
            // Firefox
            evt.preventDefault();
            evt.stopPropagation();
        } else {
            // IE
            evt.cancelBubble=true;
            evt.returnValue = false;
        }
        return false;
    }
</script>